<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /*pc 鼠标移入按钮颜色变蓝 */
    button:hover {
      background-color: aqua;
      color: white;
      cursor: pointer;
      transition: 0.3s;
      box-shadow: 0 3px #999;
      transform: translateY(3px);
      z-index: 2;
      position: relative;
      transform: translate(50%, 0%);

    }


    /*移动端 按下按钮颜色变红 */
    button:active {
      background-color: red;
      color: white;
      width: 100%;
    }
  </style>
</head>

<body>
  <button>
    点我
  </button>
</body>

</html>